import request from '@/utils/request'
export const permissionList = () => {
  return request({
    url: '/permission/list',
    method: 'get'
  })
}
// 获取指定角色权限
export const rolePermission = (roleId) => {
  return request({
    url: `/role/permission/${roleId}`,
    method: 'get'
  })
}
// 分配权限
export const pushPermission = (roleId, permissions) => {
  return request({
    url: '/role/distribute-permission',
    method: 'post',
    data: {
      roleId,
      permissions
    }
  })
}
